<?php

namespace Sistema\AdminBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class GrupoType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('tipo','choice',array('choices' => array('niños' => 'Niños','niñas' => 'Niñas')))
            ->add('idTorneo', null, array(
                'label' => 'Torneo',
            ))
            ->add('idCategoria', null, array(
                'label' => 'Categoria',
            ))
            ->add('idEquipo', null, array(
                'label' => 'Equipos del Grupo',
                'required' => false,
            ))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Sistema\AdminBundle\Entity\Grupo'
        ));
    }

    public function getName()
    {
        return 'sistema_adminbundle_grupotype';
    }
}
